#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
@Author          : ricsy
@File            : core.py.py
@Create Time     : 2025/6/18 04:40
@Last Modified   :
@Description     :
"""
import os

from sphinx.application import Sphinx
from src.settings import logger


class BaseCustomizer:
    """所有定制化功能的基类"""

    SPHINX_BOOK_THEME_NAME = "sphinx_book_theme"

    def __init__(self, app: Sphinx):
        self.app = app
        self.logger = logger

    @property
    def is_production(self) -> bool:
        """检查是否为生产环境"""
        return os.environ.get("INK_IS_PROD", "").lower() == "true"
